/**
 * 
 */
package com.gosophia.orgManagement.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.gosophia.commons.web.action.BaseSupportAction;
import com.gosophia.commons.web.logAnnotation.LogRecord;
import com.gosophia.organizationManagement.dto.PositionDTO;
import com.gosophia.organizationManagement.ws.OrganizationManagementWebService;
import com.opensymphony.xwork2.ActionContext;

/**
 * 修改职位信息用action
 * @author wangxinbing,zhaoyan
 * @since  2010-12-31
 *  Copyright (c) 2010 Gosophia corporation All Rights Reserved
 */
@Controller("ModifyPositionInfoAction")
@Scope("prototype")
public class ModifyPositionInfoAction extends BaseSupportAction {
    private static final long serialVersionUID = 1L;
    private PositionDTO positionDTO;
    private PositionDTO posDTO;
    @Autowired
    private OrganizationManagementWebService organizationManagementWebService;
    @LogRecord(eventAction="职位管理-更新职位",eventTarget="positionDTO")
    @Override
    public String _execute()throws Exception{
        posDTO = organizationManagementWebService.updatePosition(positionDTO);
        super.getRequestResult().setRsltCode("0");
        super.getRequestResult().setMessage("更新职位成功");
        return SUCCESS;
    }
    
    public PositionDTO getPositionDTO() {
        return positionDTO;
    }

    public void setPositionDTO(PositionDTO positionDTO) {
        this.positionDTO = positionDTO;
    }

    public PositionDTO getPosDTO() {
        return posDTO;
    }

    public void setPosDTO(PositionDTO posDTO) {
        this.posDTO = posDTO;
    }
    
}
